<?php

namespace App\Http\Middleware;

use Closure;
use Session;

class AuthMiddleware
{
    /**
     * Handle an incoming request.
     *
     * @param  \Illuminate\Http\Request  $request
     * @param  \Closure  $next
     * @return mixed
     */
    public function handle($request, Closure $next)
    {
        if(session('master') -> auth == 9)
        {
            return $next($request); 
        }else
        {
            return back() -> with(['info' => '抱歉,您为普通会员,无操作权限']);
        }
       
    }
}
